import threading
from PySide6.QtCore import (Qt,QObject,QMetaObject,
                            Signal,Slot,
                            QThread,QThreadPool,QRunnable,QTimer,
                            QTemporaryFile,QTemporaryDir,
                            QJsonArray,QJsonDocument,QJsonParseError,QJsonValue,
                            QFile,QFileDevice,QIODevice,QIODeviceBase)

from selenium.webdriver.edge.webdriver import WebDriver
from selenium.webdriver.edge.service import Service
from selenium.webdriver.edge.options import Options
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import *




class WorkerThread(QThread):
    finished = Signal(str)
    
    
    def run(self):
        # 模拟一个耗时操作
        
        # 发送信号并传递消息
        print(f"WorkerThread Class id = {threading.get_ident()}")
        self.finished.emit("任务完成")



class Worker(QRunnable):
    def __init__(self):
        super().__init__()
        

    def run(self):
        print(f"WorkerThread Class id = {threading.get_ident()}")        
        
